$(function(){
    $.validator.addMethod('email',function(value,element){
        var reg = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
        return this.optional(element)||value.match(reg);
    },"请输入正确的邮箱格式")
    $.validator.addMethod('password',function(value,element){
        var reg = /^[A-Z]\w{5,11}$/
        return this.optional(element)||value.match(reg);
    },"请输入正确格式的密码")
})